#define CCW_LOG "BSP"
#include <stdio.h>
#include "ccw_define.h"
#include "ccw_bsp.h"
#include "log.h"


static ccw_ops_t bsp_init_list[] = {
    {
        .module_name = "PIO",
        .init = ccw_pio_init,
    },
    {
        .module_name = "LED",
        .init = ccw_led_init,
    },
    {
        .module_name = "ADC",
        .init = ccw_adc_init,
    },
    {
        .module_name = "I2C",
        .init = ccw_i2c_init,
    },
    {
        .module_name = "HDMI",
        .init = ccw_hdmi_init,
    },
};

void bsp_init(void)
{
    // init all modules
    for (int i = 0; i < sizeof(bsp_init_list)/sizeof(ccw_ops_t); i++){
        ccw_dbg_log_d(CCW_TAG, "[%s] Module Init\r\n", bsp_init_list[i].module_name);
        bsp_init_list[i].init();
    }
}
